using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using labDict.Web.common;
using labDict.Web.business;
using labDict.Web.provider;

namespace labDict.Web
{
    public partial class ViewEdit : System.Web.UI.Page
    {
        bool boolEdit = false;

        protected void Page_Load(object sender, EventArgs e)
        {
            
            if (!IsPostBack)
            {
                InitDDLs();
                //Look up only one item
                if (Request.QueryString["lid"] != null)
                {
                    try
                    {
                        tb_TEST_ID.Text = Request.QueryString["lid"];
                        LabTest lt = LabTestBO.GetLabTest(Decimal.Parse(Request.QueryString["lid"]));
                        boolEdit = true;
                        AssignValuesLabTest(lt);
                        Utility.SetReadOnly(pnlViewLabTest.Controls, true);

                        /*
                        SqlDataAdapter sda = new SqlDataAdapter();

                        string sqlString = "Select *, D.DIVISION, S.SPEC_TYPE  " +
                                " FROM TEST T" +
                                " JOIN DIVISION D on D.DIVISION_ID = T.DIVISION_ID " +
                                " JOIN SPECIMEN S on s.spec_type_id = t.spec_type_id " +
                                " where TEST_ID = " + Request.QueryString["lid"];

                        DataSet ds = SQLHelper.GetResult(sqlString);
                        //sda.Fill(ds, "labtest");
                        DataRow myDataRow = ds.Tables[0].Rows[0];

                        tb_TEST.Text = lt.TEST;
                        tb_CLINICAL_DESCRIPTION.Text = lt.CLINICAL_DESCRIPTION;
                        ddl_DIVISION_ID.SelectedValue = lt.DIVISION_ID;
                        ddl_SPECIMEN_TYPE_ID.SelectedValue = lt.SPEC_TYPE_ID;
                        
                        lt.FUNC_AREA_ID = Decimal.Parse(ddl_FUNC_AREA_ID.SelectedValue);
                        lt.SPEC_TYPE_ID = Decimal.Parse(ddl_SPEC_TYPE_ID.SelectedValue);
                        lt.CONTAINER_ID = Decimal.Parse(ddl_CONTAINER_ID.SelectedValue);

                        lt.ALT_CONTAINER = (CheckText(tb_ALT_CONTAINER.Text)) ? tb_ALT_CONTAINER.Text : null;
                        lt.PATIENT_PREP = (CheckText(tb_PATIENT_PREP.Text)) ? tb_PATIENT_PREP.Text : null;
                        lt.MIN_VOL_WARD = (CheckText(tb_MIN_VOL_WARD.Text)) ? tb_MIN_VOL_WARD.Text : null;
                        lt.ULT_REQ_ID = Decimal.Parse(ddl_ULT_REQ_ID.SelectedValue);
                        lt.DOWN_REQ_ID = Decimal.Parse(ddl_DOWN_REQ_ID.SelectedValue);
                        lt.SUBMIT_SPEC = (CheckText(tb_SUBMIT_SPEC.Text)) ? tb_SUBMIT_SPEC.Text : null;
                        lt.INFO_CALL = (CheckText(tb_INFO_CALL.Text)) ? tb_INFO_CALL.Text : null;
                        lt.SPEC_HAND = (CheckText(tb_SPEC_HAND.Text)) ? tb_SPEC_HAND.Text : null;
                        lt.INSTRUMENT = (CheckText(tb_INSTRUMENT.Text)) ? tb_INSTRUMENT.Text : null;
                        lt.REF_OUT = (CheckText(tb_REF_OUT.Text)) ? tb_REF_OUT.Text : null;
                        lt.TAT_STAT = (CheckText(tb_TAT_STAT.Text)) ? tb_TAT_STAT.Text : null;
                        lt.REF_RANGE = (CheckText(tb_REF_RANGE.Text)) ? tb_REF_RANGE.Text : null;
                        lt.CRITICAL_VALUE = (CheckText(tb_CRITICAL_VALUE.Text)) ? tb_CRITICAL_VALUE.Text : null;
                        lt.STORE_TEMP_PRE = (CheckText(tb_STORE_TEMP_PRE.Text)) ? tb_STORE_TEMP_PRE.Text : null;
                        lt.STORE_TEMP_POST = (CheckText(tb_STORE_TEMP_POST.Text)) ? tb_STORE_TEMP_POST.Text : null;
                        lt.MIN_VOL_LAB = (CheckText(tb_MIN_VOL_LAB.Text)) ? tb_MIN_VOL_LAB.Text : null;
                        if (tb_PRICE_ESTIMATE.Text != null && tb_PRICE_ESTIMATE.Text.Trim() != "")
                        {
                            lt.PRICE_ESTIMATE = Decimal.Parse(tb_PRICE_ESTIMATE.Text);
                        }

                        if (tb_PRICE_UPPER.Text != null && tb_PRICE_UPPER.Text.Trim() != "")
                        {
                            lt.PRICE_UPPER = Decimal.Parse(tb_PRICE_UPPER.Text);
                        }

                        lt.CLINICAL_DESCRIPTION = (CheckText(tb_CLINICAL_DESCRIPTION.Text)) ? tb_CLINICAL_DESCRIPTION.Text : null;
                        lt.DOCREFERENCES = (CheckText(tb_DOCREFERENCES.Text)) ? tb_DOCREFERENCES.Text : null;
                        lt.WEB_REF_RANGE = (CheckText(tb_WEB_REF_RANGE.Text)) ? tb_WEB_REF_RANGE.Text : null;

                        //lt.REF_CONV_ID = Decimal.Parse(ddl_REF_CONV_ID.SelectedValue);
                        lt.METHOD_ID = Decimal.Parse(ddl_METHOD_ID.SelectedValue);
                        lt.COMPONENTS = (CheckText(tb_COMPONENTS.Text)) ? tb_COMPONENTS.Text : null;

                        lt.SHIPPING_ID = Decimal.Parse(ddl_SHIPPING_ID.SelectedValue);

                        lt.COLLECTION_INSTRUCTIONS = (CheckText(tb_COLLECTION_INSTRUCTIONS.Text)) ? tb_COLLECTION_INSTRUCTIONS.Text : null;
                        lt.TESTING_SCHEDULE_ID = Decimal.Parse(ddl_TESTING_SCHEDULE_ID.SelectedValue);
                        lt.TESTING_SCHEDULE2_ID = Decimal.Parse(ddl_TESTING_SCHEDULE2_ID.SelectedValue);

                        lt.WEB_TAT_ID = Decimal.Parse(ddl_WEB_TAT_ID.SelectedValue);
                        lt.LOINC_CODE = (CheckText(tb_LOINC_CODE.Text)) ? tb_LOINC_CODE.Text : null;
                        lt.LIS_CODE = (CheckText(tb_LIS_CODE.Text)) ? tb_LIS_CODE.Text : null;
                        lt.WEBVOLUME_REC = (CheckText(tb_WEBVOLUME_REC.Text)) ? tb_WEBVOLUME_REC.Text : null;
                        lt.WEBVOLUME_REQ = (CheckText(tb_WEBVOLUME_REQ.Text)) ? tb_WEBVOLUME_REQ.Text : null;
                        lt.INTERNATIONAL_UNIT_ID = Decimal.Parse(ddl_INTERNATIONAL_UNIT_ID.SelectedValue);
                        lt.SPECIMEN_TYPE_ID = Decimal.Parse(ddl_SPECIMEN_TYPE_ID.SelectedValue);
                        if (ddl_WEBDISPLAY.SelectedValue != null && ddl_WEBDISPLAY.SelectedValue.Trim() != "")
                        {
                            lt.WEBDISPLAY = Decimal.Parse(ddl_WEBDISPLAY.SelectedValue);
                        }

                        lt.WEBDISCLAIMER_ID = Decimal.Parse(ddl_WEBDISCLAIMER_ID.SelectedValue);
                        lt.SYNONYM1 = (CheckText(tb_SYNONYM1.Text)) ? tb_SYNONYM1.Text : null;
                        lt.SYNONYM2 = (CheckText(tb_SYNONYM2.Text)) ? tb_SYNONYM2.Text : null;
                        lt.SYNONYM3 = (CheckText(tb_SYNONYM3.Text)) ? tb_SYNONYM3.Text : null;
                        //lt.SOURCE = tb_SOURCE.Text;
                        if (ddl_DISPLAYINTERNAL.SelectedValue != null && ddl_DISPLAYINTERNAL.SelectedValue.Trim() != "")
                        {
                            lt.DISPLAYINTERNAL = Decimal.Parse(ddl_DISPLAYINTERNAL.SelectedValue);
                        }

                        if (tb_GRANTPRICE.Text != null && tb_GRANTPRICE.Text.Trim() != "")
                        {
                            lt.GRANTPRICE = Decimal.Parse(tb_GRANTPRICE.Text);
                        }*/

                    }
                    catch (Exception ex)
                    {
                        HandleException(ex);
                    }
                }
            }
        }

        private void HandleException(Exception ex)
        {

            lblErrorMessage.Text = ex.Message;
            lblErrorMessage.Attributes["class"] = "error";
        
        }

        protected void AssignValuesLabTest(LabTest lt)
        {
            tb_TEST.Text = lt.TEST;
            
            Utility.AssignSelectedByValue(ref ddl_DIVISION_ID, lt.DIVISION_ID.ToString());

            Utility.AssignSelectedByValue(ref ddl_SPECIMEN_TYPE_ID, lt.SPEC_TYPE_ID.ToString());

            Utility.AssignSelectedByValue(ref ddl_FUNC_AREA_ID, lt.FUNC_AREA_ID.ToString());
            Utility.AssignSelectedByValue(ref ddl_SPEC_TYPE_ID, lt.SPEC_TYPE_ID.ToString());
            Utility.AssignSelectedByValue(ref ddl_CONTAINER_ID, lt.CONTAINER_ID.ToString());

            tb_ALT_CONTAINER.Text = lt.ALT_CONTAINER;
            tb_PATIENT_PREP.Text = lt.PATIENT_PREP;
            tb_MIN_VOL_WARD.Text = lt.MIN_VOL_WARD;
            Utility.AssignSelectedByValue(ref ddl_ULT_REQ_ID, lt.ULT_REQ_ID.ToString());
            Utility.AssignSelectedByValue(ref ddl_DOWN_REQ_ID, lt.DOWN_REQ_ID.ToString());
            tb_SUBMIT_SPEC.Text = lt.SUBMIT_SPEC;
            tb_INFO_CALL.Text = lt.INFO_CALL;
            tb_SPEC_HAND.Text = lt.SPEC_HAND;
            tb_INSTRUMENT.Text = lt.INSTRUMENT;
            tb_REF_OUT.Text = lt.REF_OUT;
            tb_TAT_STAT.Text = lt.TAT_STAT;
            tb_REF_RANGE.Text = lt.REF_RANGE;
            tb_CRITICAL_VALUE.Text = lt.CRITICAL_VALUE;
            tb_STORE_TEMP_PRE.Text = lt.STORE_TEMP_PRE;
            tb_STORE_TEMP_POST.Text = lt.STORE_TEMP_POST;
            tb_MIN_VOL_LAB.Text = lt.MIN_VOL_LAB;
            tb_PRICE_ESTIMATE.Text = lt.PRICE_ESTIMATE.ToString();
            tb_PRICE_UPPER.Text = lt.PRICE_UPPER.ToString();
            
            tb_CLINICAL_DESCRIPTION.Text = lt.CLINICAL_DESCRIPTION;
            tb_DOCREFERENCES.Text = lt.DOCREFERENCES;
            tb_WEB_REF_RANGE.Text = lt.WEB_REF_RANGE;

            //ddl_REF_CONV_ID.SelectedValue = lt.REF_CONV_ID;
            Utility.AssignSelectedByValue(ref ddl_METHOD_ID, lt.METHOD_ID.ToString());
            tb_COMPONENTS.Text = lt.COMPONENTS;

            Utility.AssignSelectedByValue(ref ddl_SHIPPING_ID, lt.SHIPPING_ID.ToString());

            tb_COLLECTION_INSTRUCTIONS.Text = lt.COLLECTION_INSTRUCTIONS;
            Utility.AssignSelectedByValue(ref ddl_TESTING_SCHEDULE_ID, lt.TESTING_SCHEDULE_ID.ToString());
            Utility.AssignSelectedByValue(ref ddl_TESTING_SCHEDULE2_ID, lt.TESTING_SCHEDULE2_ID.ToString());

            Utility.AssignSelectedByValue(ref ddl_WEB_TAT_ID, lt.WEB_TAT_ID.ToString());
            tb_LOINC_CODE.Text = lt.LOINC_CODE;
            tb_LIS_CODE.Text = lt.LIS_CODE;
            tb_WEBVOLUME_REC.Text = lt.WEBVOLUME_REC;
            tb_WEBVOLUME_REQ.Text = lt.WEBVOLUME_REQ;
            Utility.AssignSelectedByValue(ref ddl_INTERNATIONAL_UNIT_ID, lt.INTERNATIONAL_UNIT_ID.ToString());
            Utility.AssignSelectedByValue(ref ddl_WEBDISPLAY, lt.WEBDISPLAY.ToString());
            Utility.AssignSelectedByValue(ref ddl_WEBDISCLAIMER_ID, lt.WEBDISCLAIMER_ID.ToString());
            //Utility.AssignSelectedByValue(ref ddl_WEBDISCLAIMER_ID, lt.WEBDISCLAIMER_ID.ToString());
            tb_SYNONYM1.Text = lt.SYNONYM1;
            tb_SYNONYM2.Text = lt.SYNONYM2;
            tb_SYNONYM3.Text = lt.SYNONYM3;
            Utility.AssignSelectedByValue(ref ddl_DISPLAYINTERNAL, lt.DISPLAYINTERNAL.ToString());
            tb_GRANTPRICE.Text = lt.GRANTPRICE.ToString();
            
        }

        protected void btnEditTest_Click(object sender, EventArgs e)
        {
            Utility.SetReadOnly(pnlViewLabTest.Controls, false);

        }

        protected void btnNewTest_Click(object sender, EventArgs e)
        {
            Response.Redirect("ViewEdit.aspx");
        }

        protected void cmdSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                LabTest lt = new LabTest();
                lt.TEST_ID = Decimal.Parse(tb_TEST_ID.Text);
                lt.TEST = tb_TEST.Text;
                lt.DIVISION_ID = Decimal.Parse(ddl_DIVISION_ID.SelectedValue);
                lt.FUNC_AREA_ID = Decimal.Parse(ddl_FUNC_AREA_ID.SelectedValue);
                lt.SPEC_TYPE_ID = Decimal.Parse(ddl_SPEC_TYPE_ID.SelectedValue);
                lt.CONTAINER_ID = Decimal.Parse(ddl_CONTAINER_ID.SelectedValue);

                lt.ALT_CONTAINER = (CheckText(tb_ALT_CONTAINER.Text)) ? tb_ALT_CONTAINER.Text : null;
                lt.PATIENT_PREP = (CheckText(tb_PATIENT_PREP.Text)) ? tb_PATIENT_PREP.Text : null;
                lt.MIN_VOL_WARD = (CheckText(tb_MIN_VOL_WARD.Text)) ? tb_MIN_VOL_WARD.Text : null;
                lt.ULT_REQ_ID = Decimal.Parse(ddl_ULT_REQ_ID.SelectedValue);
                lt.DOWN_REQ_ID = Decimal.Parse(ddl_DOWN_REQ_ID.SelectedValue);
                lt.SUBMIT_SPEC = (CheckText(tb_SUBMIT_SPEC.Text)) ? tb_SUBMIT_SPEC.Text : null;
                lt.INFO_CALL = (CheckText(tb_INFO_CALL.Text)) ? tb_INFO_CALL.Text : null;
                lt.SPEC_HAND = (CheckText(tb_SPEC_HAND.Text)) ? tb_SPEC_HAND.Text : null;
                lt.INSTRUMENT = (CheckText(tb_INSTRUMENT.Text)) ? tb_INSTRUMENT.Text : null;
                lt.REF_OUT = (CheckText(tb_REF_OUT.Text)) ? tb_REF_OUT.Text : null;
                lt.TAT_STAT = (CheckText(tb_TAT_STAT.Text)) ? tb_TAT_STAT.Text : null;
                lt.REF_RANGE = (CheckText(tb_REF_RANGE.Text)) ? tb_REF_RANGE.Text : null;
                lt.CRITICAL_VALUE = (CheckText(tb_CRITICAL_VALUE.Text)) ? tb_CRITICAL_VALUE.Text : null;
                lt.STORE_TEMP_PRE = (CheckText(tb_STORE_TEMP_PRE.Text)) ? tb_STORE_TEMP_PRE.Text : null;
                lt.STORE_TEMP_POST = (CheckText(tb_STORE_TEMP_POST.Text)) ? tb_STORE_TEMP_POST.Text : null;
                lt.MIN_VOL_LAB = (CheckText(tb_MIN_VOL_LAB.Text)) ? tb_MIN_VOL_LAB.Text : null;
                if (tb_PRICE_ESTIMATE.Text != null && tb_PRICE_ESTIMATE.Text.Trim() != "")
                {
                    lt.PRICE_ESTIMATE = Decimal.Parse(tb_PRICE_ESTIMATE.Text);
                }

                if(tb_PRICE_UPPER.Text != null && tb_PRICE_UPPER.Text.Trim() != "")
                {
                   lt.PRICE_UPPER = Decimal.Parse(tb_PRICE_UPPER.Text);
                }

                lt.CLINICAL_DESCRIPTION = (CheckText(tb_CLINICAL_DESCRIPTION.Text)) ? tb_CLINICAL_DESCRIPTION.Text : null;
                lt.DOCREFERENCES = (CheckText(tb_DOCREFERENCES.Text)) ? tb_DOCREFERENCES.Text : null;
                lt.WEB_REF_RANGE = (CheckText(tb_WEB_REF_RANGE.Text)) ? tb_WEB_REF_RANGE.Text : null;
                
                //lt.REF_CONV_ID = Decimal.Parse(ddl_REF_CONV_ID.SelectedValue);
                lt.METHOD_ID = Decimal.Parse(ddl_METHOD_ID.SelectedValue);
                lt.COMPONENTS = (CheckText(tb_COMPONENTS.Text)) ? tb_COMPONENTS.Text : null;

                lt.SHIPPING_ID = Decimal.Parse(ddl_SHIPPING_ID.SelectedValue);

                lt.COLLECTION_INSTRUCTIONS = (CheckText(tb_COLLECTION_INSTRUCTIONS.Text)) ? tb_COLLECTION_INSTRUCTIONS.Text : null;
                lt.TESTING_SCHEDULE_ID = Decimal.Parse(ddl_TESTING_SCHEDULE_ID.SelectedValue);
                lt.TESTING_SCHEDULE2_ID = Decimal.Parse(ddl_TESTING_SCHEDULE2_ID.SelectedValue);
                
                lt.WEB_TAT_ID = Decimal.Parse(ddl_WEB_TAT_ID.SelectedValue);
                lt.LOINC_CODE = (CheckText(tb_LOINC_CODE.Text)) ? tb_LOINC_CODE.Text : null;
                lt.LIS_CODE = (CheckText(tb_LIS_CODE.Text)) ? tb_LIS_CODE.Text : null;
                lt.WEBVOLUME_REC = (CheckText(tb_WEBVOLUME_REC.Text)) ? tb_WEBVOLUME_REC.Text : null;
                lt.WEBVOLUME_REQ = (CheckText(tb_WEBVOLUME_REQ.Text)) ? tb_WEBVOLUME_REQ.Text : null;
                lt.INTERNATIONAL_UNIT_ID = Decimal.Parse(ddl_INTERNATIONAL_UNIT_ID.SelectedValue);
                lt.SPECIMEN_TYPE_ID = Decimal.Parse(ddl_SPECIMEN_TYPE_ID.SelectedValue);
                if (ddl_WEBDISPLAY.SelectedValue != null && ddl_WEBDISPLAY.SelectedValue.Trim() != "")
                {
                    lt.WEBDISPLAY = Decimal.Parse(ddl_WEBDISPLAY.SelectedValue);
                }

                lt.WEBDISCLAIMER_ID = Decimal.Parse(ddl_WEBDISCLAIMER_ID.SelectedValue);
                lt.SYNONYM1 = (CheckText(tb_SYNONYM1.Text)) ? tb_SYNONYM1.Text : null;
                lt.SYNONYM2 = (CheckText(tb_SYNONYM2.Text)) ? tb_SYNONYM2.Text : null;
                lt.SYNONYM3 = (CheckText(tb_SYNONYM3.Text)) ? tb_SYNONYM3.Text : null;
                //lt.SOURCE = tb_SOURCE.Text;
                if (ddl_DISPLAYINTERNAL.SelectedValue != null && ddl_DISPLAYINTERNAL.SelectedValue.Trim() != "")
                {
                    lt.DISPLAYINTERNAL = Decimal.Parse(ddl_DISPLAYINTERNAL.SelectedValue);
                }

                if (tb_GRANTPRICE.Text != null && tb_GRANTPRICE.Text.Trim() != "")
                {
                    lt.GRANTPRICE = Decimal.Parse(tb_GRANTPRICE.Text);
                }

                //CHECK IF THIS IS AN UPDATE or Just an Insert
                if(Decimal.Parse(tb_TEST_ID.Text)>0)
                    LabTestBO.Update(lt);
                else
                    LabTestBO.Insert(lt);
                
                //pnlThanks.Visible = true;
                //pnlEnter.Visible = false;
                //regbackground.Attributes["class"] = "thankyouback";
                //ShowStatus(lblStatus, true, "");

                pnlViewLabTest.Enabled = false;
                pnlViewLabTest.Visible = false;

                lblSuccessMsg.Text = "<h3>The test was successfully saved.</h3>";
                pnlSuccess.Enabled = true;
                pnlSuccess.Visible = true;

            }
            catch (Exception ex)
            {
                HandleException(ex);
            }

            
            
        }

        private void processDDLContainer(DropDownList ddl, DDLContainer dc)
        {
            ddl.DataSource = dc.DS;
            ddl.DataTextField = dc.ItemNameString;
            ddl.DataValueField = dc.ItemValueString;
            ddl.DataBind();
            
         }
        private bool CheckText(string strValue)
        {
            if (strValue != null && strValue.Trim() != "")
                return true;
            else
                return false;
        }

        private void InitDDLs()
        {

            processDDLContainer(ddl_CONTAINER_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.CONTAINER_ID));
            processDDLContainer(ddl_DIVISION_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.DIVISION_ID));
            processDDLContainer(ddl_TESTING_SCHEDULE_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.TESTING_SCHEDULE_ID));
            processDDLContainer(ddl_TESTING_SCHEDULE2_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.TESTING_SCHEDULE_ID));
            processDDLContainer(ddl_SPEC_TYPE_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.SPEC_TYPE_ID));
            processDDLContainer(ddl_SHIPPING_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.SHIPPING_ID));
            processDDLContainer(ddl_DOWN_REQ_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.DOWN_REQ_ID));
            processDDLContainer(ddl_FUNC_AREA_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.FUNC_AREA_ID));
            processDDLContainer(ddl_METHOD_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.METHOD_ID));
            processDDLContainer(ddl_ULT_REQ_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.ULT_REQ_ID));
            processDDLContainer(ddl_WEB_TAT_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.WEB_TAT_ID));
            processDDLContainer(ddl_WEBDISCLAIMER_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.WEBDISCLAIMER_ID));
            processDDLContainer(ddl_WEBDISPLAY, LabTestBO.GetDDLItems(LabTestBO.DDLType.WEBDISPLAY));
            processDDLContainer(ddl_SHIPPING_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.SHIPPING_ID));
            processDDLContainer(ddl_SPECIMEN_TYPE_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.SPECIMEN_TYPE_ID));
            processDDLContainer(ddl_ULT_REQ_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.ULT_REQ_ID));
            processDDLContainer(ddl_INTERNATIONAL_UNIT_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.INTERNATIONAL_UNIT_ID));
            processDDLContainer(ddl_WEBDISCLAIMER_ID, LabTestBO.GetDDLItems(LabTestBO.DDLType.WEBDISCLAIMER_ID));

            ddl_WEBDISPLAY.Items.Add(new ListItem("***Select***", ""));
            ddl_WEBDISPLAY.Items.Add(new ListItem("Yes", "1"));
            ddl_WEBDISPLAY.Items.Add(new ListItem("No", "0"));

            ddl_DISPLAYINTERNAL.Items.Add(new ListItem("***Select***", ""));
            ddl_DISPLAYINTERNAL.Items.Add(new ListItem("Yes", "1"));
            ddl_DISPLAYINTERNAL.Items.Add(new ListItem("No", "0"));
        }
    }
}

